<?php 
## include required files
/*******************************/
require_once '../model/users.php';
require_once '../model/reviews.php';
/*******************************/

## Create Objects
/*******************************/
$userObj = new Model_Users();
$reviewObj = new Model_Reviews();
/*******************************/

## Fetch admin user details by id
if($_GET['id'] != '') {
	
		$reviewId = base64_decode($_GET['id']);
		$review_details = $reviewObj->getReviewById($reviewId);
		//echo "<pre>";print_r($review_details );exit;	 
		$total_rating = $review_details['rating'];
		$smarty->assign('total_rating', $total_rating);
		if($total_rating < 5){
			$remaining_rating = 5 - $total_rating;
			$smarty->assign('remaining_rating', $remaining_rating);
		} 
		$smarty->assign('review_details', $review_details);
}


## Set active class variable for left menu
$smarty->assign('activeclass', 'jobreview');
$smarty->assign('mainmenu', '7');
## Unset all the objects created which are on this page
unset($userObj);

$smarty->display(TEMPLATEDIR_ADMIN. 'review/jobreviewdetail.tpl');
unset($smarty);
?>